<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // function zuiad(a = 0, b = 0) {
      //   let max = 0;
      //   max = a > b ? a : b;
      //   return max;
      // }
      // let j = zuiad(78, 99);
      // console.log(j);
      function ght(arr = []) {
        let max = arr[0];
        let min = arr[0];
        for (let i = 0; i < arr.length; i++) {
          if (i < arr[i]) {
            min = arr[i]
          }
          if (i > arr[i]) {
            max = arr[i]
          }
        }
        return [max,min]
      }
      let p = ght([67,78,98])
      alert(p)
    </script>
  </body>
</html>
